<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.DriverManager" %>
<%@ page import="java.sql.Statement" %>
<%--
  Created by IntelliJ IDEA.
  User: 肖林
  Date: 2018/4/9
  Time: 20:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>delate</title>
</head>
<body>
 <a href="userList.jsp"><input type="button" value="返回"></a>
    <%
        String id2=request.getParameter("id");

        Connection connection=null;
        Statement statement=null;
      //  ResultSet resultSet=null;

        String sql="DELETE  FROM t_user WHERE id="+id2+"";
        Class.forName("com.mysql.jdbc.Driver");
        connection= DriverManager.getConnection(
             "jdbc:mysql://localhost:3306/javaweb_2018?serverTimezone=Asia/Shanghai",
             "root",
             "195122"
        );
       statement=connection.createStatement();
       statement.execute(sql);
       connection.close();
       statement.close();
    %>
</body>
</html>
